/*
 * @Copyright: (C) 2019 Zhang Rida. All rights reserved.
 *
 * @Author: Zhang Rida
 * @Email: 215154317@qq.com
 * @FilePath: /WEILA_SDK_MODULE/src/wlsdk/src/tts_client.h
 * @Date: 2021-02-27 17:08:35
 * @Description:
 *
 * @LastEditors: Zhang Rida
 * @LastEditTime: 2021-09-08 11:25:21
 */
#ifndef _TTS_CLIENT_H
#define _TTS_CLIENT_H

#include "wl_osal.h"

#ifdef __cplusplus
extern "C" {
#endif

#define MAX_TTS_TEXT_LEN 512

#define TTS_CLIENT_REQUEST_TIMEOUT_5 5
#define TTS_CLIENT_REQUEST_TIMEOUT_10 10
#define TTS_CLIENT_REQUEST_TIMEOUT_15 15
#define TTS_CLIENT_REQUEST_TIMEOUT_30 30
#define TTS_CLIENT_REQUEST_TIMEOUT_60 60

typedef enum {
    TTS_TTS = 0,  // TTS
    TTS_PTT       // TTS消息
} tts_type;

typedef void (*tts_client_callback)(wl_uint32 result,
                                    wl_char*  text,
                                    tts_type  type,
                                    wl_char*  content,
                                    wl_uint32 content_len,
                                    void*     context);

wl_int32 tts_client_init(void);
wl_int32 tts_client_end(void);

wl_int32 tts_client_synthesis_ptt(wl_char*            text,
                                  wl_uint32           fromid,
                                  wl_uint64           sessionid,
                                  wl_uint32           sessiontype,
                                  wl_char*            people,
                                  wl_char*            place,
                                  wl_uint32           timeout,
                                  tts_client_callback callback,
                                  void*               context);
wl_bool  tts_client_is_synthesis_ptt(void);
wl_int32 tts_client_synthesis_tts(wl_char* text, wl_uint32 timeout, tts_client_callback callback, void* context);

#ifdef __cplusplus
}
#endif
#endif
